import ConfigParser

def readConfig(option = False):
    """Reads the configuration file and returns the varable.
        takes a option."""
    
    config = ConfigParser.RawConfigParser()
    config.read('server.cfg')

    if option == "startServer":
        return int(config.get('Config', 'startserver'))
    elif option == "numberServers":
        return config.get('Config', 'numberofservers')
    elif option == "mutators":
        return config.get('Config', 'mutators')
    elif option == "location":
        return config.get('Config', 'serverdirectory')
    elif option == "logDirectory":
        return config.get('Config', 'logdirectory')
    elif option == "serverDirectory":
        return config.get('Config', 'serverdirectory')
    elif option == "serverArg1":
        return config.get('Config', 'serverarg1')
    elif option == "serverArg2":
        return config.get('Config', 'serverarg2')
    elif option == "serverArg3":
        return config.get('Config', 'serverarg3')
    elif option == "program":
        return config.get('Config', 'program')
    elif option == "username":
        return str(config.get('Config', 'username'))
    elif option == "password":
        return str(config.get('Config', 'password'))
    elif option == "updaterdir":
        return str(config.get('Config', 'updaterdir'))
    elif option == "app":
        return str(config.get('Config', 'app'))
    elif option == "prefix":
        return str(config.get('Config', 'prefix'))
    elif option == "arg1":
        return str(config.get('Config', 'arg11')) # Need Fix
    elif option == "arg2":
        return str(config.get('Config', 'arg12')) # Need Fix

    else:
        return None

    return None
